﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JBeamLibrary.VehicleParts.Collections;

namespace JBeamLibrary.VehicleParts.Elements
{
    public class CustomGlowMaterial : GlowMaterial
    {
        #region Fields

        private readonly GlowFunctionValueCollection _simpleFunction = new GlowFunctionValueCollection();

        #endregion

        #region Properties

        public GlowFunctionValueCollection SimpleFunction
        {
            get { return _simpleFunction; }
        }

        public string OnIntenseMaterial { get; set; }

        #endregion

        #region CTORs

        public CustomGlowMaterial()
            : base()
        {

        }

        public CustomGlowMaterial(string name, string on, string off, string onIntense)
            : base(name, on, off)
        {
            OnIntenseMaterial = onIntense;
        }

        public CustomGlowMaterial(string name, string on, string off, string onIntense, params KeyValuePair<string, float>[] simpleFunction)
            : this(name, on, off, onIntense)
        {
            foreach (var pair in simpleFunction)
            {
                SimpleFunction.Add(pair.Key, pair.Value);
            }
        }

        #endregion
    }
}
